Image processing apparatus and image processing method that can print an image in which a pattern or sweeping phenomenon specific to the error diffusion process does not appear

ABSTRACT

In order to vary a threshold value for performing an error diffusion process depending on a pixel position, a threshold value matrix configured to have pluralities of rows and columns is prepared. In this case, pieces of data in the threshold value matrix are arrayed such that average values in the respective rows and average values in the respective columns are almost the same value. If such a threshold value matrix is used to perform the error diffusion process, the dot sparseness and denseness do not occur with a period of the matrix, and therefore the pattern or sweeping phenomenon specific to the error diffusion can be suppressed.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to an image processing method. Moreparticularly, the present invention relates to an image processingmethod that can, even though performing an error diffusion process,print an image in which a pattern or sweeping phenomenon specific to theerror diffusion process does not appear.

2. Description of the Related Art

In a printing apparatus that prints an image by printing or non-printingof a dot, a quantization process that converts multivalued density datato binary data indicating printing (1) or non-printing (0) is required.Also, as such a quantization process, an error diffusion process hasoften been used.

FIG. 1 is a block diagram for explaining a configuration of a typicalerror diffusion process. Inputted multivalued image data (In) is addedwith a diffusion error (dIn) from a peripheral pixel by an adder 101 tobecome an input correction value (In+dIn). Then, the input correctionvalue (In+dIn) is compared with a predetermined threshold value by acomparator 102 to output a value that is binarized into any one ofprinting and non-printing. For example, in the case where the inputtedmultivalued image data (In) is a value having 0 to 255, and thethreshold value is 128, an output value (Out) of a pixel meeting [inputcorrection value (In+dIn)≧128] is 255 (printing). On the other hand, anoutput value (Out) of a pixel meeting [input correction value(In+dIn)<128] is 0 (non-printing). At this time, the comparatorcalculates a difference (error) dOut=(In+dIn)−128 between the inputcorrection value and the output value, and while applying predeterminedweighting, stores the resultant in an error buffer 103. The error storedin this manner is, when an unprocessed pixel positioned around issubjected to the binarization process, used as the above diffusion error(dIn).

As described, the error diffusion process compares inputted multivaluedimage data with a predetermined threshold value to determine printing ornon-printing, and is characterized by distributing (diffusing) an erroroccurring at the time of the determination to an unprocessed pixelpositioned around.

However, in a simple error diffusion method as illustrated in FIG. 1,due to a constant threshold value, a specific pattern or sweepingphenomenon may be recognized in a binarized image. Regarding this, forexample, Japanese Patent Laid-Open No. 2001-333277 discloses a methodthat adds random number components to a fixed threshold value to preparea plurality of different threshold values as a threshold value matrix asillustrated in FIG. 2, and repetitively uses the matrix. Also, JapanesePatent Laid-Open No. 2004-120133 discloses a method that uses athreshold value matrix prepared as in Japanese Patent Laid-Open No.2001-333277 in not the simple repetitive manner but a rotation manner.

However, in the method disclosed in Japanese Patent Laid-Open No.2001-333277, the prepared threshold value matrix is repetitively used,and therefore, in an output image, a periodic pattern depending on asize of the threshold value matrix is sometimes recognized. In order toobscure such a periodic pattern, it is effective to increase a size ofthe threshold value matrix; however, in this case, there occurs aproblem of increasing a memory capacity for storing the threshold valuematrix.

On the other hand, according to the method disclosed in Japanese PatentLaid-Open No. 2004-120133, the threshold value matrix is not used in thesimple repetitive manner, and therefore even in the case of using arelatively small threshold value matrix, a period of the threshold valuematrix is unlikely to appear in an image. Accordingly, withoutinfluencing a memory capacity, the same effect as that for the case ofan increased matrix size can be obtained. Also, even though the samethreshold value matrix is used for a plurality of color inks, bychanging an amount or direction of the rotation for each of the colors,periodic unevenness in a color image can also be avoided.

However, in the method disclosed in Japanese Patent Laid-Open No.2004-120133, due to the rotation of the threshold value matrix, thenumber of times to read the threshold value matrix is increased toincrease a load on a rotation process. As a result, image processingspeed is reduced to cause a reduction in printing speed of a printingapparatus.

Also, if a multipass printing method is employed for an image that isquantized with use of a threshold value matrix as described above, dueto synchronization between a mask pattern used for multipass printingand the threshold value matrix, the occurrence of periodic sparsenessand denseness of dots is also sometimes recognized. In this case, evenif the multipass printing is performed, sometimes, an effect of themultipass printing is unlikely to appear, or slight displacement of aprinted position at the time of the multipass printing makes the abovesparseness and denseness significant to cause image deterioration.

SUMMARY OF THE INVENTION

The present invention is made in order to solve the above problems, andan object thereof is to provide an image processing method that performsa quantization process that, without increasing a memory capacity or aload on image processing, with use of a relatively simple configuration,avoids a pattern or sweeping phenomenon specific to error diffusion, orsparseness and denseness of dots at the time of multipass printing.

In a first aspect of the present invention, there is provided an imageprocessing method for performing a quantization process of multivaluedimage data into a lower level N-value (N is an integer equal to or morethan 2) by an error diffusion process, the image processing methodcomprising: an obtaining step of adding an error from a peripheral pixelto the multivalued image data to obtain a correction value: a settingstep of, from a threshold value matrix configured such that differentvalues are arrayed in a row direction and in a column direction,selecting one value according to a pixel position of the multivaluedimage data to set a threshold value for comparing with the correctionvalue: a quantization step of, according to a result of comparing thethreshold value set in the setting step with the correction valueobtained in the obtaining step, outputting N-value data; and a diffusionstep of diffusing and storing an error between the correction value andthe N-value data, the error occurring in association with thequantization step, in a peripheral pixel position where the quantizationstep has not been performed, wherein in the threshold value matrix,average values in respective rows and average values in respectivecolumns are almost the same value.

In a second aspect of the present invention, there is provided an imageprocessing method for performing a quantization process of multivaluedimage data into a lower level N-value (N is an integer equal to or morethan 2) by an error diffusion process, the image processing methodcomprising: an obtaining step of adding an error from a peripheral pixelto the multivalued image data to obtain a correction value: a settingstep of, from a threshold value matrix configured such that differentvalues are arrayed in a row direction and in a column direction,selecting one value according to a pixel position of the multivaluedimage data to set a threshold value for comparing with the correctionvalue: a quantization step of, according to a result of comparing thethreshold value set in the setting step with the correction valueobtained in the obtaining step, outputting N-value data; and a diffusionstep of diffusing and storing an error between the correction value andthe N-value data, the error occurring in association with thequantization step, in a peripheral pixel position where the quantizationstep has not been performed, wherein in the threshold value matrix,average values in respective rows and average values in respectivecolumns are included in a range of ±15% of an average value of them.

In a third aspect of the present invention, there is provided an imageprocessing method for performing a quantization process of multivaluedimage data into a lower level N-value (N is an integer equal to or morethan 2) by an error diffusion process, the image processing methodcomprising: an obtaining step of adding an error from a peripheral pixelto the multivalued image data to obtain a correction value: a settingstep of, from a threshold value matrix configured such that differentvalues are arrayed in a row direction and in a column direction,selecting one value according to a pixel position of the multivaluedimage data to set a threshold value for comparing with the correctionvalue: a quantization step of, according to a result of comparing thethreshold value set in the setting step with the correction valueobtained in the obtaining step, outputting N-value data; and a diffusionstep of diffusing and storing an error between the correction value andthe N-value data, the error occurring in association with thequantization step, in a peripheral pixel position where the quantizationstep has not been performed, wherein in the threshold value matrix, avariation among average values in respective rows and a variation amongaverage values in respective columns are kept low as compared with acase of generating random numbers to prepare the different values.

In a fourth aspect of the present invention, there is provided an imageprocessing apparatus for performing a quantization process ofmultivalued image data into a lower level N-value (N is an integer equalto or more than 2) by an error diffusion process, the image processingapparatus comprising: an obtaining unit configured to add an error froma peripheral pixel to the multivalued image data to obtain a correctionvalue: a setting unit configured to, from a threshold value matrixconfigured such that different values are arrayed in a row direction andin a column direction, select one value according to a pixel position ofthe multivalued image data to set a threshold value for comparing withthe correction value: a quantization unit configured to, according to aresult of comparing the threshold value set by the setting unit with thecorrection value obtained by the obtaining unit, output N-value data;and a diffusion unit configured to diffuse and store an error betweenthe correction value and the N-value data, the error occurring inassociation with the quantization step, in a peripheral pixel positionwhere a quantization step by the quantization unit has not beenperformed, wherein in the threshold value matrix, average values inrespective rows and average values in respective columns are almost thesame value.

Further features of the present invention will become apparent from thefollowing description of exemplary embodiments (with reference to theattached drawings).

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram for explaining a configuration of a typicalerror diffusion process;

FIG. 2 is a diagram illustrating a typical threshold value matrix;

FIG. 3 is a block diagram for explaining a configuration of an errordiffusion process in a first embodiment;

FIG. 4 is a diagram illustrating one example of a diffusion coefficientmatrix;

FIG. 5 is a schematic diagram for explaining a 2-pass multipass printingmethod;

FIG. 6 is a diagram illustrating a threshold value matrix disclosed inJapanese Patent Laid-Open No. 2001-333277;

FIG. 7 is a diagram illustrating a result of using the threshold valuematrix in FIG. 6 to perform a binarization process;

FIG. 8 is a diagram illustrating pieces of dot data for the case ofperforming the 2-pass printing of print data in FIG. 7;

FIG. 9 is a diagram illustrating a threshold value matrix used in thefirst embodiment;

FIG. 10 is a diagram illustrating a result of using the basic thresholdvalue matrix in FIG. 9 to perform the binarization process;

FIG. 11 is a diagram illustrating pieces of dot data for the case ofperforming the 2-pass printing of print data in FIG. 10;

FIG. 12 is a flowchart for explaining a method for generating thethreshold value matrix of the present invention;

FIG. 13 is a diagram schematically illustrating data conversion of asecond embodiment;

FIG. 14 is a diagram illustrating a threshold value matrix used in thesecond embodiment;

FIG. 15 is a diagram illustrating dot patterns used in the secondembodiment;

FIGS. 16A and 16B are diagrams illustrating a result of using the indexpatterns to perform binarization;

FIG. 17 is a diagram illustrating one example of a threshold valuematrix prepared by a conventional method;

FIGS. 18A and 18B are diagrams illustrating a result of using the indexpatterns to perform binarization;

FIG. 19 is a flowchart for explaining another example of a method forgenerating a threshold value matrix;

FIG. 20 is one example of a threshold value matrix prepared according tothe flowchart in FIG. 19;

FIG. 21 is a diagram illustrating another example of mask patternsapplicable in the 2-pass multipass printing; and

FIG. 22 is a diagram illustrating pieces of dot data for the case ofperforming the 2-pass printing with use of the mask patterns in FIG. 21.

DESCRIPTION OF THE EMBODIMENTS

FIG. 3 is a block diagram for explaining a configuration of an errordiffusion process in the present embodiment. A point of difference fromthe configuration in FIG. 1 illustrated as a conventional example isthat, as a unit configured to determine a threshold value used when eachpixel is quantized, a basic threshold value matrix 104 and a thresholdvalue selection part 105 are prepared. The threshold value matrix 104 ofthe present embodiment is, as illustrated in FIG. 9, configured suchthat for each of pixel areas including main scanning direction 32pixels×sub scanning direction 16 pixels, a different threshold value ispreliminarily set. Detailed content and effect of the threshold valuematrix of the present embodiment will be described later.

In the present embodiment, multivalued image data (In) has a value of 0to 255 represented by 8 bits. An input correction value (In+dIn) addedwith a diffusion error (dIn) from a peripheral pixel by an adder 101 iscompared by a comparator 102 with one threshold value (threshold)selected from the basic threshold value matrix 104 by the thresholdvalue selection part 105. Then, the resultant is outputted as a valuethat is binarized into any one of printing (255) and non-printing (0).The comparator calculates a difference (error) between the inputcorrection value and the output value, and while applying weighting tothe peripheral pixel according to a predetermined diffusion coefficient,stores the resultant in an error buffer 103. As the diffusioncoefficient, a value as listed in the error buffer 103 of FIG. 3 canalso be used, or a value listed in FIG. 4 can also be used. The errorstored in this manner is used as the above diffusion error (dIn) when anunprocessed pixel positioned around is subjected to a binarizationprocess.

FIG. 5 is a schematic diagram for explaining a 2-pass multipass printingmethod in a serial type inkjet printing apparatus employed in thepresent embodiment. In the diagram, P001 represents a print head thatejects ink from respective ejection ports as droplets. Here, forsimplicity of description, the print head having 16 ejection ports(hereinafter also referred to as nozzles) is illustrated. In the case of2-pass multipass printing, it can be considered that the 16 nozzles are,as illustrated in the diagram, divided into first and second nozzlegroups each including 8 nozzles.

P002 represents an example of mask patterns that can be used for the2-pass multipass printing, and for each of the nozzles, a pixel allowedto be printed and a pixel not allowed to be printed are respectivelyindicated by black and white. The mask patterns respectively used forthe first and second nozzle groups have a mutually complementaryrelationship.

When actual printing is performed, while moving in an x direction in thediagram, the print head P001 ejects ink according to print data. Suchprint data is determined by performing logical additional operationbetween binary image data outputted by the above quantization processand binary data on the above mask patterns. After one print main scanhas been finished, print medium is conveyed in a y direction in thediagram by an amount equal to a length of 8 nozzles (one nozzle group).Such a print main scan by the print head P001 and the conveyanceoperation of the print paper by the amount equal to the length of 8nozzles are repeated, and thereby in a unit area of the print paper,which corresponds to 8 nozzles, an image is completed by two print mainscans respectively corresponding to the two mask patterns having themutually complementary relationship. In the diagram, P0003 and P0004illustrate a situation where the image is formed by the first and secondscans.

In this example, an example of mask patterns in which print allowablepixels are arrayed every other pixel. In printing using such maskpatterns, each nozzle does not perform ejection two successive times,and therefore the print head can be moved in the main scanning directionat a speed equal to or more than an ejection frequency achievable by thenozzle. As a result, as compared with a normal mask pattern, printingspeed can be increased. In general, in the multipass printing, ascompared with one-pass printing, the number of print main scans isincreased, and therefore printing speed tends to be lower. However, ifmask patterns as illustrated in FIG. 5 are used, a reduction in printingspeed can be minimized.

In the following, features and effect of the threshold value matrix inthe present embodiment are described.

FIG. 6 is a threshold value matrix disclosed in Japanese PatentLaid-Open No. 2001-333277, which is intended to be compared with thethreshold value matrix 104 used in the present embodiment. In this case,the threshold value matrix has 32 pixel areas in an x direction (mainscanning direction) and 16 pixel areas in a y direction (sub scanningdirection). While relating the above threshold value matrix 104 to apixel position of the image data (In), the threshold value selectionpart 105 described with FIG. 3 sequentially selects one threshold valuefrom the threshold value matrix 104 for every input pixel. Then, afterhaving selected all threshold values in the threshold value matrix 104,the threshold value selection part 105 is adapted to return again to thehead of the threshold value matrix to sequentially relate a thresholdvalue.

In the threshold value matrix disclosed in Japanese Patent Laid-Open No.2001-333277, an intermediate signal value of 128 is added with randomnumber components to set individual threshold values. In the diagram, onthe right and lower sides, an x direction average value in each row anda y direction average value in each column are illustrated. Each ofthese average values is said to correspond to a print probability of adot in each row or column. That is, regarding a row (column) of which anaverage value of threshold values is low, the input correction value islikely to be larger than a threshold value, and therefore the row(column) is one where a dot is relatively likely to be printed. On theother hand, regarding a row (column) of which an average value ofthreshold values is high, the input correction value is likely to besmaller than a threshold value, and therefore the row (column) is onewhere a dot is relatively unlikely to be printed. In the case of FIG. 6,the random number components are simply generated to thereby set theindividual threshold values, and therefore threshold values in a row orcolumn does not have any mutual relationship. As a result, averagevalues among rows or columns randomly vary.

FIG. 7 is a diagram illustrating a result of using the threshold valuematrix in FIG. 6 to perform the binarization process. In print dataafter the binarization process, a periodic pattern due to repetitivelyrelating the threshold value matrix occurs. This is because in thethreshold value matrix, print probability of dot is biased, which causesthe occurrence of sparseness and denseness of dots, and the sparsenessand denseness are repeated and thereby recognized as the pattern.

FIG. 8 is a diagram in which in the case of using the mask patternsillustrated in FIG. 5 to perform the 2-pass printing of the print datain FIG. 7, dot data printed by the first pass and dot data printed bythe second pass are respectively illustrated. In such pieces of dotdata, further intense dot sparseness and denseness than that in FIG. 7are recognized as vertical stripes. This is because in the thresholdvalue matrix of FIG. 6, a variation among the average values in therespective columns is large, which causes the occurrence of a columnwhere a dot is likely to be printed and a column where a dot is unlikelyto be printed, and such columns are arrayed to cause the verticalstripes. Further, in the case of performing the multipass printing withuse of the pieces of dot data as illustrated in FIG. 8, if between printscans, slight displacement of printed position or displacement oflanding position of each dot occurs, the sparseness and denseness arefurther emphasized, and in a printed image, significant vertical stripesare recognized.

On the other hand, FIG. 9 illustrates the threshold value matrix 104used in the present embodiment. In the threshold value matrix used inthe present embodiment, average values in respective columns in a ydirection are all coincident with 128 for all the columns. On the otherhand, average values in respective rows in an x direction have a smallvariation of 127.254 to 128.75. That is, the average values among therespective rows and among the respective columns in the threshold valuematrix of the present embodiment are not as varied as those in thethreshold value matrix of FIG. 6 in the conventional example.

FIG. 10 is a diagram illustrating a result of using the basic thresholdvalue matrix in FIG. 9 to perform the binarization process. In printdata after the binarization process, even though the threshold valuematrix is repetitively related, a periodic pattern is hardly recognized.This is because print probability of dot is not biased in the basicthreshold value matrix, and therefore dot sparseness and denseness donot occur, so that even if the same pattern is repeated, a correspondingperiod is unlikely to be recognized as a pattern.

FIG. 11 is a diagram in which in the case of using the mask patternsillustrated in FIG. 5 to perform the 2-pass printing of the print dataillustrated in FIG. 10, dot data printed by the first pass and dot dataprinted by the second pass are respectively illustrated. In such piecesof dot data in the present embodiment, the dot sparseness and densenessas recognized in FIG. 8 are not recognized. This is because in thethreshold value matrix of FIG. 9, a variation among the average valuesin the respective columns is absent, and therefore a column where a dotis likely to be printed and a column where a dot is unlikely to beprinted do not occur. Accordingly, even in the case of performing themultipass printing with use of the pieces of dot data as illustrated inFIG. 11, slight displacement of printed position or displacement oflanding position of each dot between the print scans does not cause thevertical stripes, and therefore a uniform printed image can beoutputted.

FIG. 12 is a flowchart for explaining a method for generating thethreshold value matrix used in the present embodiment. When this processis started, first, in Step 1, a 32×16 initial matrix is prepared. Theinitial matrix is prepared with use of values obtained by giving 9-stagenoise values (−32, −24, −16, −8, 0, +8, +16, +24, +32) to a referencethreshold value of 128. Specifically, from the above 9 types of values,16 threshold values are selected for each of the columns such that anaverage value of total 16 pieces of data in each of the column is 128.

Then, in Step 2, with a combination in each of the columns being fixed,values in each of the columns are vertically moved (shuffled) to changea combination in each of the rows. Subsequently, a difference between anaverage value in each of the rows and the reference value (128) isobtained to calculate a sum of the differences in the total 16 rows.

In Step 3, it is determined whether or not the sum obtained in Step 2 isa minimum value, and if the sum is minimized, the flow proceeds to Step4 to complete the matrix with present threshold value positions beingfixed. On the other hand, if the difference obtained in Step 2 is notminimized, the flow returns to Step 2, where the vertical movement isagain made to obtain averages and a sum of differences in nextcombinations. Such threshold value movement and average valuedetermination are repeated until the above sum of differences becomesequal to the minimum value. In this case, the above minimum value isfixed at a time point when the initial matrix is prepared in Step 1.Specifically, a difference between a value obtained by further averagingthe respective averages in the total 16 rows of the initial matrix andthe reference value of 128 serves as the above minimum value. In thismanner, the threshold value matrix as illustrated in FIG. 9 can begenerated.

According to the present embodiment described above, by performing theerror diffusion process with use of the threshold value matrix in whichthe average values in the row direction and the average values in thecolumn direction are set to almost the same value, an image having nopattern or sweeping phenomenon specific to the error diffusion or no dotsparseness and denseness at the time of multipass printing can beoutputted with use of a relatively simple configuration.

Note that, in the present embodiment, the values obtained by adding the9-stage noise values (−32, −24, −16, −8, 0, +8, +16, +24, +32) to thereference threshold value of 128 are set as the threshold values;however, the threshold value matrix of the present embodiment is notlimited to such a threshold value combination. A range of noise valuesand a step size are preferably optimally set depending on a diffusioncoefficient matrix as illustrated in FIG. 4, print mode of a printingapparatus, dot size, or the like. Also, in the case of using inksrespectively having a plurality of colors, an appropriate thresholdvalue matrix may be prepared for each of the ink colors.

A method for generating the threshold value matrix is not limited to themethod illustrated in FIG. 9. For example, in the above, the method thatprepares the initial matrix having the same average values in the columndirection to generally uniform the average values in the row directionis used; however, a method that first prepares an initial matrix havingthe same average values in the row direction to generally uniform theaverage values in the column direction is also possible. If, in acompleted threshold value matrix, the average values in the rowdirection and those in the column direction are almost the same value,even if the threshold value matrix is generated by any method, theeffect of the present embodiment can be obtained. According toexamination by the present inventors, if variations in average values inboth of the row and column directions fall within the ranges of ±10% ofaverage values, it is verified that a pattern appearing due to a periodof a threshold value matrix is obscure. Also, if the variations inaverage values in both of the row and column directions fall within theranges of ±15% of average values, it is verified that stripes occurringat the time of multipass printing are difficult to notice.

Second Embodiment

In the present embodiment, described is image processing for the case ofquantizing multivalued (e.g., 256-value) image data to obtain lowerlevel multivalued data (e.g., 4-value) by a multivalued error diffusionprocess, and then using a prepared dot pattern to convert the lowerlevel multivalued data to binary data.

FIG. 13 is a diagram schematically illustrating data conversion in thepresent embodiment. 600 dpi (dot/inch) image data 401 having8-bit/256-gradation is first converted to 600 dpi image data 402 having2-bit/4-gradation by the multivalued error diffusion process. Then, by adot patterning process, the image data 402 is converted to 1200 dpibinary data 403 having 1-bit/2-gradation. If such data conversion isemployed, image processing such as the error diffusion process can beperformed at a lower resolution (600 dpi) than a print resolution (1200dpi) of a printing apparatus, and therefore a processing time can beshortened.

Meanwhile, in the multivalued error diffusion process, in order toperform the quantization process, a plurality of threshold values arerequired. For example, in the case where the multivalued error diffusionprocess is an N-arization process (N is an integer equal to or more than2), (N−1) threshold values are required. In the present embodiment, inorder to perform an N-arized error diffusion process where N is 3 ormore, (N−1)-stage reference threshold values and one threshold valuematrix are prepared. Regarding the (N−1)-stage reference thresholdvalues, for example, in the case of quarternarizing a signal value of 0to 255, three stages of 64, 128, and 192 can be set.

FIG. 14 is a diagram illustrating one example of the threshold valuematrix used in the present embodiment. In the present embodiment, noisecomponents around 0 are stored in the matrix. In the diagram, on theright and lower sides of the threshold value matrix, an x directionaverage value in each row and a y direction average value in each columnare illustrated. Variations in these average values are, as in the firstembodiment, said to correspond to variations in dot print probabilitiesin each row and each column, respectively. In the present embodiment,the y direction average values in the respective columns are all 0. Onthe other hand, the x direction average values in the respective rowshave a small variation of 1.25 to −1.25 around 0. By using such amatrix, variations of dot print probabilities in the row and columndirections in each of the reference threshold values can be suppressed.

In addition, even in the present embodiment, as in the first embodiment,the block diagram illustrated in FIG. 3 can also be employed. In thiscase, in the threshold value matrix 104, only noise component values asillustrated in FIG. 14 are stored. At the time of quantization, thethreshold value selection part 105 adds one noise component selectedfrom the threshold value matrix 104 to each of the three referencethreshold values (64, 128, 192) to prepare three threshold values, andthen passes them to the comparator 102. The comparator 102 comparesthese three threshold values with the input correction value to outputany of values of 0 to 3.

In the present embodiment, the 600 dpi image data having 4-value data of0 to 3 outputted by the multivalued error diffusion process is thenconverted to the 1200 dpi binary data that sets printing (1) ornon-printing (0). At this time, a plurality of prepared dot patterns arereferred to, and the dot patterns corresponding to levels of respectivepixels are selected one by one.

FIG. 15 is a diagram illustrating dot patterns used in the presentembodiment. Four areas formed by 2×2 correspond to one 600 dpi pixel,and each 1×1 area corresponds to one 1200 dpi pixel. In the diagram, anarea indicated by black and an area indicated by white represent a pixelprinted with a dot and a pixel not printed with a dot, respectively. Itturns out that as a level value is increased, the number of areas eachprinted with a dot increases. In the present embodiment, four dotpatterns (I) to (IV) are prepared for each of the levels, and even inthe case where the same level continues, different patterns aresequentially used.

FIGS. 16A and 16B are diagrams illustrating a result of binarizing theresult of the multivalued error diffusion process with use of the indexpatterns in FIG. 15. Here, FIG. 16A illustrates the case where all 600dpi pixels are quantized into a level 1. In the case where the all 600dpi pixels have the same level as described, if only one type of dotpattern (e.g., (I) in FIG. 15) is prepared, dot printing may be biasedto any one of odd-numbered columns and even-numbered column, or any oneof odd-numbered rows and even-numbered rows. However, if the four typesof dot patterns as illustrated in FIG. 15 are sequentially allocated inthe row direction and the column direction, as illustrated in FIG. 16B,the dot printing can be suppressed from being biased to any one ofodd-numbered columns and even-numbered column, or any one ofodd-numbered rows and even-numbered rows. In FIG. 16B, on the right andlower sides of the pieces of binary data, sums (the numbers) of printeddots in each of the rows and each of the columns are indicated. As isalso clear from the diagram, the numbers of printed dots in therespective rows are the same, i.e., 4, and the numbers of printed dotsin the respective columns are the same, i.e., 2. As described, in thepresent embodiment, by preparing the plurality of dot arrangementpatterns, dots can be suppressed from being biased in the 600 dpi pixelswith corresponding to the level values set by the multivalued errordiffusion process.

However, in the case of using the conventional threshold value matrix toperform the multivalued error diffusion, among the respective 600 dpirows and among the respective 600 dpi columns, variations are includedin average values of the threshold value matrix.

FIG. 17 is a diagram illustrating an example of a threshold value matrixprepared by the conventional method, which is intended to be comparedwith the second embodiment. Noise components prepared by generatingrandom numbers are stored in the matrix. Y direction average values inrespective columns and x direction average values in respective rowshave large variations as compared with the threshold value matrix of thepresent embodiment illustrated in FIG. 14. That is, a row or column ofwhich a level value is likely to increase or decrease is inevitablygenerated.

FIGS. 18A and 18B are diagrams illustrating a result of using the indexpatterns in FIG. 15 to binarize a result of using the threshold valuematrix illustrated in FIG. 17 to perform the multivalued error diffusionprocess. In this case, rows and columns of which level values originallytend to be high, and rows and columns of which level values originallytend to be low are irregularly arranged, and therefore even in the caseof using the dot patterns as illustrated in FIG. 15 to suppress dotsfrom being biased in 600 dpi pixels, sparseness and denseness of dots ina wider range cannot be suppressed. As a result, as seen in FIG. 18B,the numbers of printed dots in respective 1200 dpi columns, and thenumbers of printed dots in respective 1200 dpi rows are both in a biasedstate.

As described, in the present embodiment, the multivalued error diffusionprocess using the threshold value matrix in which the average values inthe respective rows and the average values in the respective columns donot include any variation, and the binarization process using theplurality of dot patterns as illustrated in FIG. 15 are collaborativelyoperated to thereby preferably disperse the dots.

Note that, in the above, the description is provided with use of theexample of using the 2×2 dot patterns to binarize the dataquarternarized by the multivalued error diffusion; however, the presentembodiment is not limited to such a configuration. If the presentembodiment is configured to be able to quantize multivalued image datainto lower level N-value, and then use m×k dot patterns to makeconversion to binary data that meets a print resolution of a printingapparatus, the present embodiment is capable of responding even if N, m,and k respectively have any values.

Also, the noise components used when the threshold value matrix isprepared have the values obtained by adding the 9-stage noise values(−32, −24, −16, −8, 0, +8, +16, +24, +32) to the reference value of 0;however, they are not limited to the values obtained by such acombination. As in the first embodiment, a range and a step size ofnoise values are preferably optimally set depending on a diffusioncoefficient matrix used in the error diffusion process, print mode of aprinting apparatus, dot size, or the like. Also, in the case of usinginks respectively having a plurality of colors, an appropriate thresholdvalue matrix may be prepared for each of the ink colors.

Other Embodiments

In the above, the first embodiment is described so that the thresholdvalue matrix storing the threshold values is prepared, and the secondembodiment is described so that the noise components corresponding tothe reference value are prepared as the threshold value matrix; however,it should be appreciated that such configurations do not limit thepresent invention. The first embodiment may also be configured toprepare one threshold value matrix storing only noise components for onereference value of 128. In this case, it is also effective to prepare adifferent noise component matrix for each ink color for the onereference value of 128. On the other hand, the second embodiment mayalso be configured to prepare (N−1) types of threshold value matrixesstoring not noise components but threshold values to thereby performquantization into an N-value.

Also, a method for generating the characteristic threshold value matrixof the present invention is not limited to the flowchart described withFIG. 12.

FIG. 19 is a flowchart for explaining another example of a method forgenerating a threshold value matrix usable in the present invention.When this process is started, first, in Step 11, a 32×16 initial matrixis prepared. The initial matrix is prepared with use of values obtainedby giving noise values having a step size of 1 within a range of ±32(−32, −31, −30, . . . , +30, +31, +32) to a reference threshold value of128. That is, the initial matrix is configured to have values of (96,97, 98, . . . , 158, 159, 160).

The step of preparing the initial matrix is specifically described.First, the above 32 values are generated with use of random numbers toprepare a first row matrix. Then, an average value of the 32 values iscalculated to determine whether or not the average value is 128, and ifthe average value is 128, the row matrix is temporarily set. If theaverage value is not 128, random numbers are regenerated to prepareanother first row matrix. Such preparation and determination arerepeated until the average value becomes equal to 128. After the firstrow matrix has been temporarily set, a second row matrix is thentemporarily set in the same manner as that for the first row.Subsequently, the above step is repeated until a sixteenth row matrix isset, and consequently the 32×16 initial matrix is completed.

After the initial matrix has been completed in Step 11, in Step 12,average values in the respective columns of the initial matrix areobtained. Then, a column of which an average value is maximum, and acolumn of which an average value is minimum are selected.

In subsequent Step 13, one predetermined row is selected from thesixteen rows constituting the initial matrix, and then in the row, avalue of the column having the maximum average value and a value of thecolumn having the minimum average value are replaced by each other. Theabove one predetermined row is set such that a difference between saidmaximum average value and said minimum average value is minimized by thereplacement.

Further, in Step 14, it is determined whether or not all of averagevalues in the 32 columns are 128. If any of all of the average values inthe 32 columns is not 128, the flow returns to Step 12 to repeat Steps12 to 14 until all of the average values in the columns become equal to128. If all of the average values in the columns become equal to 128, amatrix at this stage is determined to be the threshold value matrix, andthen this process is finished.

FIG. 20 is one example of the threshold value matrix obtained accordingto the flowchart in FIG. 19. In the case of using such a threshold valuematrix to perform the error diffusion process, average values ofthreshold values in all columns and rows can be equally adjusted to 128with threshold values for respective pixels being varied. Therefore, ascompared with the first embodiment, a further improved image can beexpected.

Also, in the above first and second embodiments, described is the 2-passmultipass printing that uses the mask patterns illustrated in FIG. 5 toprint odd-numbered columns and even-numbered columns by different scans;however, it should be appreciated that the present invention is notlimited to such multipass printing.

FIG. 21 is a diagram illustrating another example of mask patternsapplicable for the 2-pass multipass printing in the present invention.FIG. 22 is a diagram in which in the case of using the mask patternsillustrated in FIG. 21 to perform the 2-pass printing of the binary dataillustrated in FIG. 10, dot data printed by the first pass and dot dataprinted by the second pass are respectively illustrated. Even in thecase of using such mask patterns, as in FIG. 11 described in the firstembodiment, dot sparseness and denseness are not recognized.

The mask patterns illustrated in FIG. 5 or 21 are one example of maskpatterns applicable for the 2-pass printing, and in the presentembodiment, any mask patterns are applicable if the mask patterns have amutually complementary relationship. Also, even in the case of multipassprinting other than 2-pass printing, in combination with the thresholdvalue matrix having the above-described characteristic, the effect ofthe present invention can be produced to output a good image.

Further, in the any of the above embodiments, describes is that, byusing the characteristic threshold value matrix of the presentinvention, without performing the rotation as in Japanese PatentLaid-Open No. 2004-120133, a pattern or sweeping phenomenon specific tothe error diffusion can be avoided with a small memory capacity.However, the present invention does not exclude the configuration ofJapanese Patent Laid-Open No. 2004-120133. Even though using thecharacteristic threshold value matrix in the present invention, whileperforming the rotation described in Japanese Patent Laid-Open No.2004-120133 on the matrix, setting a threshold value for each pixelenables the pattern or sweeping phenomenon specific to the errordiffusion to be further effectively suppressed by collaborativeoperation of the both.

While the present invention has been described with reference toexemplary embodiments, it is to be understood that the invention is notlimited to the disclosed exemplary embodiments. The scope of thefollowing claims is to be accorded the broadest interpretation so as toencompass all such modifications and equivalent structures andfunctions.

This application claims the benefit of Japanese Patent Application No.2011-012988, filed Jan. 25, 2011, which is hereby incorporated byreference herein in its entirety.

What is claimed is:
 1. An image processing method, executed by an imageprocessing apparatus, for performing a quantization process ofmultivalued image data into a lower level N-value (N is an integer equalto or more than 2) by an error diffusion process, the image processingmethod comprising: inputting multivalued image data of an image; anobtaining step of adding an error from a peripheral pixel to themultivalued image data of a target pixel of an image to obtain acorrection value; a setting step of, from a threshold value matrixconfigured such that different values are arrayed in a row array and ina column array, selecting one value according to a pixel position of thetarget pixel in the image to set a threshold value for comparing withthe correction value, the row consisting of pixels corresponding tovalues in the row array and the column consisting of pixelscorresponding to values in the column array intersecting; a quantizationstep of, according to a result of comparing the threshold value set inthe setting step with the correction value obtained in the obtainingstep, outputting N-value data; a diffusion step of diffusing an errorbetween the correction value and the N-value data, the error occurringin association with the quantization step, in a peripheral pixelposition where the quantization step has not been performed; andoutputting a value indicating printing or non-printing of the targetpixel, wherein in the threshold value matrix, average values inrespective rows or average values in respective columns are almost asame value.
 2. The image processing method according to claim 1, whereinthe threshold value matrix is configured such that different thresholdvalues for comparing with the correction value are arrayed in the rowand the column, and in the setting step, according to a pixel positionof the multivalued image data, one of the threshold values is selectedand set from the threshold value matrix.
 3. The image processing methodaccording to claim 1, wherein the threshold value matrix is configuredsuch that different components for setting differences from a thresholdvalue serving as a reference are arrayed in the row and in the column,and in the setting step, according to a pixel position of themultivalued image data, one of the components is selected from thethreshold value matrix, and on a basis of the component and thethreshold value serving as a reference, the threshold value forcomparing with the correction value is set.
 4. The image processingmethod according to claim 1, wherein the N-value is a 2-value.
 5. Theimage processing method according to claim 1, wherein the N-value is a3-value or more, the image processing method further comprising: a stepof, from a plurality of dot patterns each in which printing ornon-printing of a dot is preliminarily set for each of m×k areas,selecting one dot pattern according to the N-value data outputted by thequantization step, and thereby converting the N-value data to binarydata, wherein regarding the plurality of dot patterns, a plurality ofdot patterns are prepared for each of one level value of the N-valuedata.
 6. The image processing method according to claim 1, wherein theimage processing method is a method for printing an image by ejectingink according to the N-value data output in the quantization step whilerelative movement of a nozzle array, in which a plurality of nozzles forejecting ink are arrayed in a predetermined direction, in a directioncrossing to the predetermined direction with respect to a print medium,wherein the predetermined direction corresponds to the column and thecrossing direction corresponds to the row.
 7. The image processingmethod according to claim 6, wherein a printing for a unit area of theprint medium is performed by a plurality of the relative movements ofthe nozzle array, and ink ejecting is allowed for every other column ineach of the relative movements and the column which is allowed to printis changed for each of the relative movement.
 8. The image processingmethod according to claim 1, wherein in the threshold value matrix, theaverage values in respective rows are almost the same value.
 9. Theimage processing method according to claim 1, wherein in the thresholdvalue matrix, the average values in respective columns are almost thesame value.
 10. The image processing method according to claim 1,wherein in the threshold value matrix, the average values in respectiverows and the average values in respective columns are almost the samevalue.
 11. An image processing method, executed by an image processingapparatus, for performing a quantization process of multivalued imagedata into a lower level N-value (N is an integer equal to or more than2) by an error diffusion process, the image processing methodcomprising: inputting multivalued image data of an image; an obtainingstep of adding an error from a peripheral pixel to the multivalued imagedata of a target pixel of an image to obtain a correction value; asetting step of, from a threshold value matrix configured such thatdifferent values are arrayed in a row array and in a column array,selecting one value according to a pixel position of the target pixel inthe image to set a threshold value for comparing with the correctionvalue, the row consisting of pixels corresponding to values in the rowarray and the column consisting of pixels corresponding to values in thecolumn array intersecting; a quantization step of, according to a resultof comparing the threshold value set in the setting step with thecorrection value obtained in the obtaining step, outputting N-valuedata; a diffusion step of diffusing an error between the correctionvalue and the N-value data, the error occurring in association with thequantization step, in a peripheral pixel position where the quantizationstep has not been performed; and outputting a value indicating printingor non-printing of the target pixel, wherein in the threshold valuematrix, average values in respective rows or average values inrespective columns are included in a range of ±15% of an average valueof them.
 12. The image processing method according to claim 11, whereinin the threshold value matrix, the average values in the respective rowsand the average values in the respective columns are included in a rangeof ±10% of an average value of them.
 13. The image processing methodaccording to claim 11, wherein the image processing method is a methodfor printing an image by ejecting ink according to the N-value dataoutput in the quantization step while relative movement of a nozzlearray, in which a plurality of nozzles for ejecting ink are arrayed in apredetermined direction, in a direction crossing to the predetermineddirection with respect to a print medium, wherein the predetermineddirection corresponds to the column and the crossing directioncorresponds to the row.
 14. The image processing method according toclaim 13, wherein a printing for a unit area of the print medium isperformed by a plurality of the relative movements of the nozzle array,and ink ejecting is allowed for every other column in each of therelative movements and the column which is allowed to print is changedfor each of the relative movements.
 15. The image processing methodaccording to claim 11, wherein in the threshold value matrix, theaverage values in respective rows are almost the same value.
 16. Theimage processing method according to claim 11, wherein in the thresholdvalue matrix, the average values in respective columns are almost thesame value.
 17. The image processing method according to claim 11,wherein in the threshold value matrix, the average values in respectiverows and the average values in respective columns are almost the samevalue.
 18. An image processing method, executed by an image processingapparatus, for performing a quantization process of multivalued imagedata into a lower level N-value (N is an integer equal to or more than2) by an error diffusion process, the image processing methodcomprising: inputting multivalued image data of an image; an obtainingstep of adding an error from a peripheral pixel to the multivalued imagedata of a target pixel of an image to obtain a correction value; asetting step of, from a threshold value matrix configured such thatdifferent values are arrayed in a row array and in a column array,selecting one value according to a pixel position of the target pixel inthe image to set a threshold value for comparing with the correctionvalue, the row consisting of pixels corresponding to values in the rowarray and the column consisting of pixels corresponding to values in thecolumn array intersecting; a quantization step of, according to a resultof comparing the threshold value set in the setting step with thecorrection value obtained in the obtaining step, outputting N-valuedata; a diffusion step of diffusing an error between the correctionvalue and the N-value data, the error occurring in association with thequantization step, in a peripheral pixel position where the quantizationstep has not been performed; and outputting a value indicating printingor non-printing of the target pixel, wherein in the threshold valuematrix, a variation among average values in respective rows or avariation among average values in respective columns are kept low ascompared with a case of generating random numbers to prepare thedifferent values.
 19. The image processing method according to claim 18,wherein the image processing method is a method for printing an image byejecting ink according to the N-value data output in the quantizationstep while relative movement of a nozzle array, in which a plurality ofnozzles for ejecting ink are arrayed in a predetermined direction, in adirection crossing to the predetermined direction with respect to aprint medium, wherein the predetermined direction corresponds to thecolumn and the crossing direction corresponds to the row.
 20. The imageprocessing method according to claim 19, wherein a printing for a unitarea of the print medium is performed by a plurality of the relativemovements of the nozzle array, and ink ejecting is allowed for everyother column in each of the relative movements and the column which isallowed to print is changed for each of the relative movements.
 21. Theimage processing method according to claim 18, wherein in the thresholdvalue matrix, the average values in respective rows are almost the samevalue.
 22. The image processing method according to claim 18, wherein inthe threshold value matrix, the average values in respective columns arealmost the same value.
 23. The image processing method according toclaim 18, wherein in the threshold value matrix, the average values inrespective rows and the average values in respective columns are almostthe same value.
 24. An image processing apparatus for performing aquantization process of multivalued image data into a lower levelN-value (N is an integer equal to or more than 2) by an error diffusionprocess, the image processing apparatus comprising: a processorexecuting: inputting multivalued image data of an image; an obtainingstep of adding an error from a peripheral pixel to the multivalued imagedata of a target pixel of an image to obtain a correction value; asetting step of, from a threshold value matrix configured such thatdifferent values are arrayed in a row array and in a column array,selecting one value according to a pixel position of the target pixel inthe image to set a threshold value for comparing with the correctionvalue, the row consisting of pixels corresponding to values in the rowarray and the column consisting of pixels corresponding to values in thecolumn array intersecting; a quantization step of, according to a resultof comparing the threshold value set by the setting step with thecorrection value obtained by the obtaining step, outputting N-valuedata; a diffusion step of diffusing an error between the correctionvalue and the N-value data, the error occurring in association with thequantization step, in a peripheral pixel position where the quantizationstep has not been performed; and outputting a value indicating printingor non-printing of the target pixel, wherein in the threshold valuematrix, average values in respective rows or average values inrespective columns are almost a same value.
 25. The image processingapparatus according to claim 24, wherein the image processing apparatusis for printing an image by ejecting ink according to the N-value dataoutput in the quantization step while relative movement of a nozzlearray, in which a plurality of nozzles for ejecting ink are arrayed in apredetermined direction, in a direction crossing to the predetermineddirection with respect to a print medium, wherein the predetermineddirection corresponds to the column and the crossing directioncorresponds to the row.
 26. The image processing apparatus according toclaim 25, wherein a printing for a unit area of the print medium isperformed by a plurality of the relative movements of the nozzle array,and ink ejecting is allowed for every other column in each of therelative movements and the column which is allowed to print is changedfor each of the relative movements.
 27. The image processing apparatusaccording to claim 24, wherein in the threshold value matrix, theaverage values in respective rows are almost the same value.
 28. Theimage processing apparatus according to claim 24, wherein in thethreshold value matrix, the average values in respective columns arealmost the same value.
 29. The image processing apparatus according toclaim 24, wherein in the threshold value matrix, the average values inrespective rows and the average values in respective columns are almostthe same value.